package com.kun.kunkunmall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kun.common.to.SeckillOrderTo;
import com.kun.common.utils.PageUtils;
import com.kun.kunkunmall.order.entity.OrderEntity;
import com.kun.kunkunmall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author wsk
 * @email wsk@gmail.com
 * @date 2023-04-22 13:24:48
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 给订单确认页返回需要的数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    SubmitRespVo submitOrder(OrderSubmitVo submitVo);

    OrderEntity getOrderStatus(String orderSn);

    void closeOrder(OrderEntity entity);

    PayVo getOrderPay(String orderSn);

    PageUtils listWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createOrderSeckillOrder(SeckillOrderTo seckillOrderTo);
}

